<?php
/**
 * Innoexts
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the InnoExts Commercial License
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://innoexts.com/commercial-license-agreement
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@innoexts.com so we can send you a copy immediately.
 * 
 * @category    Innoexts
 * @package     Innoexts_AdvancedDataflow
 * @copyright   Copyright (c) 2011 Innoexts (http://www.innoexts.com)
 * @license     http://innoexts.com/commercial-license-agreement  InnoExts Commercial License
 */

$installer = $this;
$installer->startSetup();

$installer->installEntities();

$this->startSetup()->run("
INSERT INTO `{$this->getTable('dataflow_profile')}` (`profile_id`, `name`, `created_at`, `updated_at`, `actions_xml`, `gui_data`, `direction`, `entity_type`, `store_id`, `data_transfer`) VALUES
(NULL, 'Export Orders', '2011-06-15 05:20:03', '2011-06-15 05:20:03', '<action type=\"advanceddataflow/sales_convert_adapter_order\" method=\"load\">\r\n    <var name=\"store\"><![CDATA[0]]></var>\r\n</action>\r\n\r\n<action type=\"advanceddataflow/sales_convert_parser_order\" method=\"unparse\">\r\n    <var name=\"store\"><![CDATA[0]]></var>\r\n    <var name=\"url_field\"><![CDATA[0]]></var>\r\n</action>\r\n\r\n<action type=\"dataflow/convert_mapper_column\" method=\"map\">\r\n</action>\r\n\r\n<action type=\"dataflow/convert_parser_csv\" method=\"unparse\">\r\n    <var name=\"delimiter\"><![CDATA[,]]></var>\r\n    <var name=\"enclose\"><![CDATA[\"]]></var>\r\n    <var name=\"fieldnames\">true</var>\r\n</action>\r\n\r\n<action type=\"dataflow/convert_adapter_io\" method=\"save\">\r\n    <var name=\"type\">file</var>\r\n    <var name=\"path\">var/export</var>\r\n    <var name=\"filename\"><![CDATA[export_orders.csv]]></var>\r\n</action>\r\n\r\n', 'a:8:{s:6:\"export\";a:1:{s:13:\"add_url_field\";s:1:\"0\";}s:6:\"import\";a:2:{s:17:\"number_of_records\";s:1:\"1\";s:17:\"decimal_separator\";s:1:\".\";}s:4:\"file\";a:8:{s:4:\"type\";s:4:\"file\";s:8:\"filename\";s:17:\"export_orders.csv\";s:4:\"path\";s:10:\"var/export\";s:4:\"host\";s:0:\"\";s:4:\"user\";s:0:\"\";s:8:\"password\";s:0:\"\";s:9:\"file_mode\";s:1:\"2\";s:7:\"passive\";s:0:\"\";}s:5:\"parse\";a:5:{s:4:\"type\";s:3:\"csv\";s:12:\"single_sheet\";s:0:\"\";s:10:\"fieldnames\";s:4:\"true\";s:9:\"delimiter\";s:1:\",\";s:7:\"enclose\";s:1:\"\"\";}s:3:\"map\";a:4:{s:14:\"only_specified\";s:0:\"\";s:7:\"product\";a:2:{s:2:\"db\";a:0:{}s:4:\"file\";a:0:{}}s:8:\"customer\";a:2:{s:2:\"db\";a:0:{}s:4:\"file\";a:0:{}}s:5:\"order\";a:2:{s:2:\"db\";a:0:{}s:4:\"file\";a:0:{}}}s:7:\"product\";a:1:{s:6:\"filter\";a:8:{s:4:\"name\";s:0:\"\";s:3:\"sku\";s:0:\"\";s:4:\"type\";s:1:\"0\";s:13:\"attribute_set\";s:0:\"\";s:5:\"price\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:3:\"qty\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:10:\"visibility\";s:1:\"0\";s:6:\"status\";s:1:\"0\";}}s:8:\"customer\";a:1:{s:6:\"filter\";a:10:{s:9:\"firstname\";s:0:\"\";s:8:\"lastname\";s:0:\"\";s:5:\"email\";s:0:\"\";s:5:\"group\";s:1:\"0\";s:10:\"adressType\";s:15:\"default_billing\";s:9:\"telephone\";s:0:\"\";s:8:\"postcode\";s:0:\"\";s:7:\"country\";s:0:\"\";s:6:\"region\";s:0:\"\";s:10:\"created_at\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}}}s:5:\"order\";a:1:{s:6:\"filter\";a:50:{s:12:\"increment_id\";s:0:\"\";s:13:\"real_order_id\";s:0:\"\";s:11:\"coupon_code\";s:0:\"\";s:6:\"status\";s:0:\"\";s:15:\"shipping_method\";s:0:\"\";s:17:\"customer_group_id\";s:1:\"0\";s:14:\"customer_email\";s:0:\"\";s:18:\"customer_firstname\";s:0:\"\";s:17:\"customer_lastname\";s:0:\"\";s:10:\"created_at\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:10:\"updated_at\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:6:\"weight\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:16:\"total_item_count\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:19:\"order_currency_code\";s:0:\"\";s:15:\"shipping_amount\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:10:\"tax_amount\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:8:\"subtotal\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:11:\"grand_total\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:15:\"discount_amount\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:17:\"subtotal_incl_tax\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:9:\"total_due\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:22:\"shipping_address_email\";s:0:\"\";s:26:\"shipping_address_firstname\";s:0:\"\";s:25:\"shipping_address_lastname\";s:0:\"\";s:24:\"shipping_address_company\";s:0:\"\";s:21:\"shipping_address_city\";s:0:\"\";s:27:\"shipping_address_country_id\";s:0:\"\";s:23:\"shipping_address_region\";s:0:\"\";s:25:\"shipping_address_postcode\";s:0:\"\";s:26:\"shipping_address_telephone\";s:0:\"\";s:21:\"billing_address_email\";s:0:\"\";s:25:\"billing_address_firstname\";s:0:\"\";s:24:\"billing_address_lastname\";s:0:\"\";s:23:\"billing_address_company\";s:0:\"\";s:20:\"billing_address_city\";s:0:\"\";s:26:\"billing_address_country_id\";s:0:\"\";s:22:\"billing_address_region\";s:0:\"\";s:24:\"billing_address_postcode\";s:0:\"\";s:25:\"billing_address_telephone\";s:0:\"\";s:8:\"item_sku\";s:0:\"\";s:9:\"item_name\";s:0:\"\";s:16:\"item_qty_ordered\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:11:\"item_weight\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:15:\"item_row_weight\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:10:\"item_price\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:15:\"item_tax_amount\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:20:\"item_discount_amount\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:14:\"item_row_total\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:19:\"item_price_incl_tax\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:23:\"item_row_total_incl_tax\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}}}}', 'export', 'order', 0, 'file'), 
(NULL, 'Import Orders', '2011-06-15 05:22:54', '2011-06-15 05:22:54', '<action type=\"dataflow/convert_parser_csv\" method=\"parse\">\r\n    <var name=\"delimiter\"><![CDATA[,]]></var>\r\n    <var name=\"enclose\"><![CDATA[\"]]></var>\r\n    <var name=\"fieldnames\">true</var>\r\n    <var name=\"store\"><![CDATA[0]]></var>\r\n    <var name=\"number_of_records\">1</var>\r\n    <var name=\"decimal_separator\"><![CDATA[.]]></var>\r\n    <var name=\"adapter\">advanceddataflow/sales_convert_adapter_order</var>\r\n    <var name=\"method\">parse</var>\r\n</action>', 'a:8:{s:6:\"export\";a:1:{s:13:\"add_url_field\";s:1:\"0\";}s:6:\"import\";a:2:{s:17:\"number_of_records\";s:1:\"1\";s:17:\"decimal_separator\";s:1:\".\";}s:4:\"file\";a:8:{s:4:\"type\";s:4:\"file\";s:8:\"filename\";s:16:\"export_order.csv\";s:4:\"path\";s:10:\"var/export\";s:4:\"host\";s:0:\"\";s:4:\"user\";s:0:\"\";s:8:\"password\";s:0:\"\";s:9:\"file_mode\";s:1:\"2\";s:7:\"passive\";s:0:\"\";}s:5:\"parse\";a:5:{s:4:\"type\";s:3:\"csv\";s:12:\"single_sheet\";s:0:\"\";s:10:\"fieldnames\";s:4:\"true\";s:9:\"delimiter\";s:1:\",\";s:7:\"enclose\";s:1:\"\"\";}s:3:\"map\";a:4:{s:14:\"only_specified\";s:0:\"\";s:7:\"product\";a:2:{s:2:\"db\";a:0:{}s:4:\"file\";a:0:{}}s:8:\"customer\";a:2:{s:2:\"db\";a:0:{}s:4:\"file\";a:0:{}}s:5:\"order\";a:2:{s:2:\"db\";a:0:{}s:4:\"file\";a:0:{}}}s:7:\"product\";a:1:{s:6:\"filter\";a:8:{s:4:\"name\";s:0:\"\";s:3:\"sku\";s:0:\"\";s:4:\"type\";s:1:\"0\";s:13:\"attribute_set\";s:0:\"\";s:5:\"price\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:3:\"qty\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:10:\"visibility\";s:1:\"0\";s:6:\"status\";s:1:\"0\";}}s:8:\"customer\";a:1:{s:6:\"filter\";a:10:{s:9:\"firstname\";s:0:\"\";s:8:\"lastname\";s:0:\"\";s:5:\"email\";s:0:\"\";s:5:\"group\";s:1:\"0\";s:10:\"adressType\";s:15:\"default_billing\";s:9:\"telephone\";s:0:\"\";s:8:\"postcode\";s:0:\"\";s:7:\"country\";s:0:\"\";s:6:\"region\";s:0:\"\";s:10:\"created_at\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}}}s:5:\"order\";a:1:{s:6:\"filter\";a:50:{s:12:\"increment_id\";s:0:\"\";s:13:\"real_order_id\";s:0:\"\";s:11:\"coupon_code\";s:0:\"\";s:6:\"status\";s:0:\"\";s:15:\"shipping_method\";s:0:\"\";s:17:\"customer_group_id\";s:1:\"0\";s:14:\"customer_email\";s:0:\"\";s:18:\"customer_firstname\";s:0:\"\";s:17:\"customer_lastname\";s:0:\"\";s:10:\"created_at\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:10:\"updated_at\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:6:\"weight\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:16:\"total_item_count\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:19:\"order_currency_code\";s:0:\"\";s:15:\"shipping_amount\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:10:\"tax_amount\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:8:\"subtotal\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:11:\"grand_total\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:15:\"discount_amount\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:17:\"subtotal_incl_tax\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:9:\"total_due\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:22:\"shipping_address_email\";s:0:\"\";s:26:\"shipping_address_firstname\";s:0:\"\";s:25:\"shipping_address_lastname\";s:0:\"\";s:24:\"shipping_address_company\";s:0:\"\";s:21:\"shipping_address_city\";s:0:\"\";s:27:\"shipping_address_country_id\";s:0:\"\";s:23:\"shipping_address_region\";s:0:\"\";s:25:\"shipping_address_postcode\";s:0:\"\";s:26:\"shipping_address_telephone\";s:0:\"\";s:21:\"billing_address_email\";s:0:\"\";s:25:\"billing_address_firstname\";s:0:\"\";s:24:\"billing_address_lastname\";s:0:\"\";s:23:\"billing_address_company\";s:0:\"\";s:20:\"billing_address_city\";s:0:\"\";s:26:\"billing_address_country_id\";s:0:\"\";s:22:\"billing_address_region\";s:0:\"\";s:24:\"billing_address_postcode\";s:0:\"\";s:25:\"billing_address_telephone\";s:0:\"\";s:8:\"item_sku\";s:0:\"\";s:9:\"item_name\";s:0:\"\";s:16:\"item_qty_ordered\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:11:\"item_weight\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:15:\"item_row_weight\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:10:\"item_price\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:15:\"item_tax_amount\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:20:\"item_discount_amount\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:14:\"item_row_total\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:19:\"item_price_incl_tax\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:23:\"item_row_total_incl_tax\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}}}}', 'import', 'order', 0, 'interactive')
");

$installer->endSetup();